<template>
	<view class="item">
		<label class="label" style="float:left">{{label}}<span class="fuhao" v-if="required">*</span></label>
		<input v-if="readonly" type="text" class="text readyonly" disabled="true" :value="value" />
		<input v-else type="text" class="text" :value="value" />
	</view>
</template>

<script>
	export default {
		props: {
			label: {
				type: String,
			},
			value: {
				type: String,
			},
			required: {
				type: Boolean,
				default: false
			},
			readonly: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {

			};
		},
		methods: {}
	}
</script>

<style lang="scss" scoped>
	.item {
		height: 48px;
		background-color: white;
		margin-bottom: 8px;
		margin-top: 8px;

		.label {
			font-size: 16px;
			color: #12245380;
			line-height: 48px;
			padding: 0px 0px 0px 11px;
		}

		.text {
			text-align: right;
			font-size: 16px;
			color: #122453;
			line-height: 48px;
			padding: 0px 18.5px 0px 0px;
			height: 48px;
		}

		.readyonly {
			color: #12245380;
		}

		.fuhao {
			margin-left: 4px;
			color: #E34D59;
		}
	}
</style>
